<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录验证</title>
<script type="text/javascript">
	function refresh(){
		document.getElementById("image").src="<c:url value="image.do"/>"+"?now="+new Date();""
	}
</script>
</head>
<body>
	<c:if test="${!empty requestScope.error}">
	<p style="color:red"><c:out value="${requestScope.error}"/></p>
	</c:if>
	<form method="post" action="<c:url value="login.do"/>">
	<table border="0" align="center">
	<tr>
		<th>
			用户名:<input type="text" name="userName" value="${param.userName }"><br>
		</th> 
	</tr>
	<tr>	                                                                                                                                                                                                                     
		<th>
			密&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="password" name="passwd"><br>
		</th>
	</tr>
	<tr>
		<th>
			验证码:<input type="text" name="testcode" value="${param.testCode }"><br>
		</th>
	</tr>
	<tr>	
		<th>
			<img alt="image" id="image" src="<c:url value="image.do"/>" >
			看不清？<a href="#" onclick="refresh()">请点击刷新！</a>
		</th>
		
	</tr>
	</table>
	</form>
</body>
</html>